package com.guet.common.response;


import lombok.Getter;

/**
 * @author dragon
 */
@Getter
public enum ResultCodeEnum {
    SUCCESS(200, "SUCCESS"),
    FAIL(5000, "未知错误"),
    FAIL_TOKEN(401, "token无效或过期"),
    FAIL_PREMISSION(402, "账户无权限"),
    BIZ_FAIL(501, "业务错误"),

    FAIL_PARAM_MISSING(510, "缺少必填参数"),
    FAIL_REQUEST_TYPE(511, "请求内容类型错误"),
    FAIL_PARAM_TYPE(512, "参数类型不匹配"),
    FAIL_REQUEST_CONTENT(513, "无法读取请求内容"),
    FAIL_PARAM_VALIDATE(514, "参数值不合法"),
    FAIL_REQUEST_METHOD(515, "请求方法错误"),
    ;

    private Integer code;
    private String msg;

    ResultCodeEnum(Integer code, String msg) {
        this.code = code;
        this.msg = msg;
    }
}
